<?php 

require ("sharedResources.php");

$sid = '';
try {
	$sid = login ( 'admin', 'admin' );
	echo 'sid: ' . $sid . PHP_EOL;
	
	// This is the ID of the folder to delete
	$folderID = 6488064;
	$deleteFolderParams = array('sid' => $sid, 'folderId' => $folderID);
	
	$result = $folderClient->delete($deleteFolderParams);
	print_r ( $result );
	
	echo PHP_EOL . "Folder $folderID deleted";
	//unset ( $folderClient );
} catch ( SoapFault $e ) {
    // If we try to delete a non existent folder the Web-service returns and exception
	print_r ( $e );
}

// Always we need to logout in order to release connection slot
logout ( $sid );

?> 
